<?php
/**
 * Created by PhpStorm.
 * User: tangchao
 * Date: 19-4-19
 * Time: 下午3:04
 */

//return $this; 实现链式操作
namespace Lib;


use Lib\Db\MySQLi;

class Database
{

    protected static $db;
    public $tableName = 'users';

    //设为私有方法 避免直接实例化
    private function __construct()
    {

    }

    //已有实例化对象直接返回,否则创建
    static function getInstance()
    {
        if (empty(self::$db)){
            self::$db = new self();
        }
        return self::$db;
    }

    function where($where){
        return $this;
    }

    function order($order){
        return $this;
    }

    function limit($limit){
        return $this;
    }
}